1. Field of the Invention
Apparatuses and methods consistent with the present invention relate to audio encoding and decoding, and more particularly, to connecting and encoding sinusoidal waves of an audio signal.
2. Description of the Related Art
Parametric coding is a method of segmenting an input audio signal by a specific length in a time domain and extracting sinusoidal waves with respect to the segmented audio signals. As a result of the extraction of the sinusoidal waves, if sinusoidal waves having similar frequencies are continued over several segments in the time domain, the sinusoidal waves having similar frequencies are connected and encoded using the parametric coding.
When connecting and encoding the sinusoidal waves having similar frequencies in the parametric coding, a frequency, a phase, and an amplitude of each of the sinusoidal waves are encoded first, and then a phase value and an amplitude difference of the connected sinusoidal wave are encoded.
When a phase value is encoded, in conventional parametric coding, a phase of a current segment is predicted from a frequency and phase of a previous segment (or a previous frame), and Adaptive Differential Pulse Code Modulation (ADPCM) of an error between the predicted phase and an actual phase of the current segment is performed. However, the ADPCM is a method of encoding a subsequent segment more finely using the same number of bits by decreasing an error signal measurement scale when the error is small.
Thus, when a frequency of an input audio signal is suddenly changed and an error signal measurement scale immediately before the frequency is changed is very small, a detected error may exceed a range that can be represented using bits of the ADPCM, and thus, a wrong encoding result may be obtained, resulting in a decrease in sound quality.